package lesson14;

public class CarDemo {

	public static void main(String[] args) 
	{
		Car skoda = new Car();
		Car audi = new Car();
	
		skoda.model = "Skoda";
		skoda.maxSpeed = 210;
		skoda.currentSpeed = 240;
		skoda.color = "black";
		skoda.currentGear = 5;
		skoda.owner.age = 25;
		skoda.owner.name = "Pesho";
		audi.model = "Audi";
		audi.maxSpeed = 215;
		audi.currentSpeed = 260;
		audi.color = "white";
		audi.currentGear = 6;
		audi.owner.age = 23;
		audi.owner.name = "Miro";
		
		skoda.currentSpeed = audi.currentSpeed;
		skoda.maxSpeed = audi.maxSpeed;
		
		System.out.println("Model " + skoda.model);
		System.out.println("Max speed " + skoda.maxSpeed);
		System.out.println("Current speed " + skoda.currentSpeed);
		System.out.println("Color " + skoda.color);
		System.out.println("Current gear " + skoda.currentGear);
		System.out.println("The owner is " + skoda.owner.name);
		System.out.println("The age of the owner is " + skoda.owner.age);
		System.out.println();
		System.out.println(audi.model);
		System.out.println(audi.maxSpeed);
		System.out.println(audi.currentSpeed);
		System.out.println(audi.color);
		System.out.println(audi.currentSpeed);
		System.out.println("The owner is " + audi.owner.name);
		System.out.println("The age of the owner is " + audi.owner.age);
	
		

	}

}
